<?php
/**
 * Created by PhpStorm.
 * User: yxs
 * Date: 2017/4/18
 * Time: 11:02
 */

namespace validate;

use think\Validate;

class Admin extends Validate
{
    protected $rule = [
        "nick" => "require|unique:admin",
        "password"=>"require"
    ];

    protected $message = [
        "nick.unique"=>"昵称已存在",
        "nick.require"=>"请输入昵称",
        "password.require"=>"请输入密码"
    ];
    protected $scene = [
        'edit'  =>  ['nick'=>'require'],
    ];
}